package com.cq.hd.member.service;

import com.cq.hd.common.pagination.Page;
import com.cq.hd.member.api.dto.AppUserPageDto;
import com.cq.hd.member.api.dto.AppUserPwdUpdateDto;
import com.cq.hd.member.api.dto.LoginDto;
import com.cq.hd.member.api.dto.OrderSettleUpdateDto;
import com.cq.hd.member.api.vo.AppUserPageVo;
import com.cq.hd.member.api.vo.AppUserVo;
import com.cq.hd.member.po.TbAppUserPo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * app用户表 服务类
 * </p>
 *
 * @author mYunYu
 * @since 2023-11-21
 */
public interface TbAppUserService extends IService<TbAppUserPo> {

    Page<AppUserPageVo> pageAppUser(AppUserPageDto appUserPageDto);

    AppUserVo getByMobile(String mobile);

    AppUserVo register(LoginDto loginDto);

    AppUserVo getAppUserById(long id);

    AppUserVo getByOpenId(String openId);

    List<AppUserVo> listByUserIds(List<Long> userIds);

    Integer getNewCountByDate(String startTime, String endTime);

    Boolean addCommissionAmt(Long userId, BigDecimal commissionAmt);

    Boolean updateOrderSettleAmt(OrderSettleUpdateDto orderSettleUpdateDto);

    Boolean subCommissionAmt(Long userId, BigDecimal tradeAmt);

    Boolean updateUnionidById(Long id, String unionid);

    AppUserVo getByUnionid(String unionid);

    Boolean updatePwd(AppUserPwdUpdateDto appUserPwdUpdateDto);
}
